import RequestUtils from '@/utils/RequestUtils'

export default {
  /**
   * 新增
   * @param params
   * @returns {AxiosPromise}
   */
  add(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },
  /**
   * 批量删除（多个用逗号隔开）
   * @param ids
   * @returns {AxiosPromise}
   */
  remove(ids) {
    return RequestUtils({
      url: `/baoli/finCreditBill/${ids}`,
      method: 'DELETE'
    })
  },
  /**
   * 修改
   * @param params
   * @returns {AxiosPromise}
   */
  edit(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill`,
      method: 'PUT',
      data: {
        ...params
      }
    })
  },
  /**
   * 详情
   * @param id
   * @returns {AxiosPromise}
   */
  get(id) {
    return RequestUtils({
      url: `/baoli/finCreditBill/${id}`,
      method: 'GET'
    })
  },
  /**
   * 列表
   * @param params
   * @returns {AxiosPromise}
   */
  list(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/search`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },
  /**
   * 列表-分页
   * @param params
   * @returns {AxiosPromise}
   */
  page(params = {}, page) {
    return RequestUtils({
      url: `/baoli/finCreditBill/search/${page.current}/${page.pageSize}`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },

rongziProve(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/paymentConfirm`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },

  baolipage(params = {}, page) {
    return RequestUtils({
      url: `/baoli/finCreditBill/baoliSearch/${page.current}/${page.pageSize}`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },
  recepage(params = {}, page) {
    return RequestUtils({
      url: `/baoli/finCreditBill/receSearch/${page.current}/${page.pageSize}`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },

 submitPurchase(params = {}) {
  	return RequestUtils({
  		url: '/baoli/finCreditBill/purchaseInsert',
  		method: 'POST',
  		data: {
  			...params
  		}
  	})
  },
  submit(params = {}) {
  	return RequestUtils({
  		url: '/baoli/finCreditBill',
  		method: 'POST',
  		data: {
  			...params
  		}
  	})
  },
  getList(params = {}, page) {
  	return RequestUtils({
  		url: `/baoli/finCreditBill/search/${page.current}/${page.pageSize}`,
  		method: 'POST',
  		data: {
  			...params
  		}
  	})
  },
 applyPay(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/cashOut`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },
baoliProve(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/platFormprove`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },

  /**
   * 修改
   * @param params
   * @returns {AxiosPromise}
   */
  receive(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/receive`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },
  /**
   * 修改
   * @param params
   * @returns {AxiosPromise}
   */
  prove(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/prove`,
      method: 'POST',
      data: {
        ...params
      }
    })
  },
  
  findTotalMyRejectBill() {
    return RequestUtils({
      url: `/baoli/finCreditBill/findTotalMyRejectBill`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
  findTotalMyBill() {
    return RequestUtils({
      url: `/baoli/finCreditBill/findTotalMyBill`,
      method: 'post'//,
      // data: {
      //   ...params
      // }
    })
  },
  /**
   * 导出
   * @param params
   * @returns {AxiosPromise}
   */
  exportData(params = {}) {
    return RequestUtils({
      url: `/baoli/finCreditBill/exportData`,
      method: 'POST',
      data: {
        ...params
      }
    })
  }
}
